import Vue from 'vue'
import VueRouter from 'vue-router'



// 路由模块的引入
const Entry=()  =>  import('../views/entry/entry') 
import About from '../views/about/about.vue'
import Show1 from '../views/about/show/show1'
import Show2 from '../views/about/show/show2'
import Show3 from '../views/about/show/show3'
import Show4 from '../views/about/show/show4'
import Show5 from '../views/about/show/show5'
Vue.use(VueRouter)

const routes = [
    {
        path:'',
        redirect:'/entry'

    },
    {
        path:'/entry',
        component:Entry,
        meta:{
            title:'入口'
        }
    },
    // 关于界面
    {
        path:'/about',
        component:About,
        meta:{title:"关于"},
       children:[
        {
            path:'',
            redirect:"/about/1"
        },
        {
            path:'1',
            component:Show1
        },
        {
            path:'2',
            component:Show2
        },
        {
            path:'3',
            component:Show3
        },
        {
            path:'4',
            component:Show4
        },
        {
            path:'5',
            component:Show5
        }
    ]
    }
    

]

const router = new VueRouter({
    base: '/fives-sister--home/',
    routes,
    mode:'history',
    // linkActiveClass:'active'
    
})
// 全局导航守卫
// router.beforeEach((to,from,next) => {
//     // 嵌套的路由的使用参数meta
//     document.title = to.matched[0].meta.title
// /    next()
// })

// router.afterEach( (to,from) => {

// })

export default router